package lyc.springcloud.admin.utils;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

@NoArgsConstructor
@AllArgsConstructor
public enum CommonResInfo {
    // 全局info
    SUCCESS(0, "success！"),
    FAIL(-1, "fail!"),
    PARAM_ERR(-2, "参数不合法！"),
    PARAM_MISS(-3, "确少参数！"),
    PROGRAM_ERR(-4, "程序异常，请联系管理员！"),
    USER_NOT_FOUND(-101, "当前用户未注册！"),
    USER_ILLEGAL(-102, "当前用户不合法！"),
    USER_STATUS_INVALID(-103, "当前用户状态失效！"),
    TOKEN_INVALID(-999, "当前用户登录令牌失效！")
    ;

    private Integer code;
    private String msg;
    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
